package cn.zero.config;

import cn.zero.service.WalletService;
import cn.zero.util.Calculator;
import hello.T1Application;

public class AppConstants {

	public static final double TOTAL = 10 * 10000 * 10000;
	
	public static double BALANCE = 0;
	
	public static final double FRIST_SIGN_UP_PRIZE_AMOUNT = 1000;
	
	public static final double INVITE_SIGN_UP_PRIZE_AMOUNT = 500;
	
	public static final double WEIXIN_SUBSCRIBE_PRIZE_AMOUNT = 1000;
	
	public static void calculateBalance() {
		BALANCE = Calculator.substract(AppConstants.TOTAL,
				T1Application.CONTEXT.getBean(WalletService.class).sumBalance());
	}
	
}
